<?php
yii::app()->user->hasFlash('contact');
echo Yii::app()->user->getFlash('contact');
?>
<div class="panel-body">
    <div class="table-responsive">
        <table class="table table-striped table-bordered table-hover" id="dataTables-example">
            <thead>
            <tr>
                <th>id</th>
                <th>Edit</th>
                <th>DEL</th>
                <th>Glyphicons</th>
                <th>category_name</th>
                <th>Lớp Cha</th>
                <th>Trạng Thái</th>
            </tr>
            </thead>
            <tbody>
            <?php
            foreach($listcategory as $key=>$value){
                ?>
                <tr>
                    <th><?php echo $value->id; ?></th>
                    <th><a href="<?php echo Yii::app()->createUrl('admin/category/preedit',array('id'=>$value->id))?>">Sửa</a></th>
                    <th><a href="<?php echo Yii::app()->createUrl('admin/category/delete',array('id'=>$value->id))?>" onclick="return confirm('bạn có muốn xóa không');" >Xóa</a></th>
                    <th><i class="<?php echo $value->glyphicons?>">... <?php echo $value->glyphicons?></i></th>
                    <th><?php echo $value->category_name ?></th>
                    <th><?php echo Category::GetParentId($value->parent_id)?></th>
                    <th><?php echo $value->status ?></th>
                </tr>
            <?php }?>
            </tbody>
        </table>

    </div>
</div>
